package com.kinghunt.misp.web.controller.projectx;

import com.bygoodtech.kings.common.dto.ApiResult;
import com.bygoodtech.kings.common.dto.page.PageInfo;
import com.kinghunt.misp.common.dto.projectx.ProjectFullDTO;
import com.kinghunt.misp.common.param.projectx.ProjectCondition;
import com.kinghunt.misp.common.param.projectx.ProjectParam;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * 项目管理
 *
 * @Author jiangtao
 * @Date 2025年3月7日
 */
@RestController
@RequestMapping("/api/projectx/project/")
public class ProjectController {

    /**
     * 获取项目详情
     * @param projectId
     * @return
     */
    @GetMapping("get")
    public ApiResult<ProjectFullDTO> getProject(Long projectId) {

        return ApiResult.ok();
    }

    /**
     * 新增项目
     *
     * @param param
     * @return
     */
    @PostMapping(value = "add", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ApiResult<Long> addProject(@RequestBody ProjectParam param) {

        return ApiResult.ok();
    }

    /**
     * 搜索项目
     *
     * @param condition
     * @return
     */
    @GetMapping("search")
    public ApiResult<PageInfo<ProjectFullDTO>> searchProject(ProjectCondition condition) {

        return ApiResult.ok();
    }

    /**
     * 删除项目
     *
     * @param projectId
     * @return
     */
    @GetMapping("delete")
    public ApiResult<Void> deleteProject(Long projectId) {

        return ApiResult.ok();
    }

    /**
     * 更新项目基础信息
     *
     * @param param
     * @return
     */
    @PostMapping(value = "updateBasic", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ApiResult<Long> updateProjectBasic(@RequestBody ProjectParam param) {

        return ApiResult.ok();
    }
}
